package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 博客
 *
 * @author 梁云亮
 */
@ApiModel(value = "Domain:Blog")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_blog")
public class Blog implements Serializable {
    private static final long serialVersionUID = 2626151586259384572L;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "编号")
    private Integer id;

    /**
     * 标题
     */
    @TableField(value = "title")
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 博客内容
     */
    @TableField(value = "content")
    @ApiModelProperty(value = "博客内容")
    private String content;

    /**
     * 二维码
     */
    @TableField(value = "qrcode")
    @ApiModelProperty(value = "二维码")
    private String qrcode;

    /**
     * 关键字，优化搜索
     */
    @TableField(value = "keywords")
    @ApiModelProperty(value = "关键字，优化搜索")
    private String keywords;

    /**
     * 文件格式：markdown-1
     */
    @TableField(value = "format")
    @ApiModelProperty(value = "文件格式：markdown-1")
    private Integer format;

    /**
     * 浏览数
     */
    @TableField(value = "views")
    @ApiModelProperty(value = "浏览数")
    private Integer views;

    /**
     * 点赞数
     */
    @TableField(value = "agrees")
    @ApiModelProperty(value = "点赞数")
    private Integer agrees;

    /**
     * 来源：1原创、2转载、3翻译
     */
    @TableField(value = "source")
    @ApiModelProperty(value = "来源：1原创、2转载、3翻译")
    private Integer source;

    /**
     * 发布类型：1公开、2私密、3粉丝可见、4VIP可见
     */
    @TableField(value = "pubtype")
    @ApiModelProperty(value = "发布类型：1公开、2私密、3粉丝可见、4VIP可见")
    private Integer pubtype;

    /**
     * 用户编号
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户编号")
    private Integer userId;

    /**
     * 状态：1草稿、2发布、3审核中、4审核通过、5删除
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "状态：1草稿、2发布、3审核中、4审核通过、5删除")
    private Integer status;

    /**
     * 是否置顶
     */
    @TableField(value = "is_top")
    @ApiModelProperty(value = "是否置顶")
    private Boolean isTop;

    /**
     * 是否开启赞赏
     */
    @TableField(value = "is_admire")
    @ApiModelProperty(value = "是否开启赞赏")
    private Boolean isAdmire;

    /**
     * 是否开启版权声明
     */
    @TableField(value = "is_copyright")
    @ApiModelProperty(value = "是否开启版权声明")
    private Boolean isCopyright;

    /**
     * 是否开启评论
     */
    @TableField(value = "is_comment")
    @ApiModelProperty(value = "是否开启评论")
    private Boolean isComment;

    /**
     * 是否开启推荐
     */
    @TableField(value = "is_recommend")
    @ApiModelProperty(value = "是否开启推荐")
    private Boolean isRecommend;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;

}
